package org.example.safe;

/**
 * @author ZerlindaLi create at 2021/3/30 14:37
 * @version 1.0.0
 * @description Driver
 */
public class Driver {
    public static void main(String[] args) {
        System.out.println( "=====================安全组合模式=====================" );
        Folder d = new Folder("D盘", 1);
        Folder ali = new Folder("AliWorkbenchData", 2);
        Folder data = new Folder("AppDate", 3);
        Folder doc = new Folder("我的文档", 2);
        File report = new File("述职报告");

        d.addChild(ali);
        d.addChild(doc);

        ali.addChild(data);
        doc.addChild(report);

        d.show();

        System.out.println( "=====================d.list()=====================" );
        d.list();

        System.out.println( "=====================ali.list()=====================" );
        ali.list();

        System.out.println( "=====================doc.list()=====================" );
        doc.list();



    }
}
